<?php

namespace app\api\controller;

use think\Controller;

class Base extends Controller
{
   protected function initialize(){
		parent::initialize();
		header('Access-Control-Allow-Origin: *');
		header("Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept");
		header('Access-Control-Allow-Methods: POST,GET');
		if(request()->isOptions()){
			exit();
		}
	}
}
